package pri.syl.xiaowu.websocket.init.core.factory.execution;

import pri.syl.xiaowu.websocket.core.template.WebsocketRouteTemplate;
import pri.syl.xiaowu.websocket.init.core.factory.WebsocketRouteInitFactory;

import java.util.Map;

/**
 * @Author YunLong
 * @Date 2021/7/18 18:42
 * @Description 添加websocket实现到WebsocketRouteTemplate容器中
 **/
public class WebsocketRouteInitFactoryExecution {
    private WebsocketRouteInitFactoryExecution() {
    }

    public static void execution(Map<String, Object> routeTemplateMap) {
        routeTemplateMap.forEach((beanName, routeTemplate) -> WebsocketRouteInitFactory.addWebsocketRouteTemplate((WebsocketRouteTemplate) routeTemplate));
    }
}
